# https://hub.docker.com/r/apache/hive
FROM apache/hive:4.2.0

# https://github.com/juicedata/juicefs/releases
RUN wget https://github.com/juicedata/juicefs/releases/download/v1.2.4/juicefs-hadoop-1.2.4.jar -O /tmp/juicefs-hadoop.jar
# https://mvnrepository.com/artifact/org.postgresql/postgresql
RUN wget https://repo1.maven.org/maven2/org/postgresql/postgresql/42.7.8/postgresql-42.7.8.jar -O /tmp/postgresql.jar

USER root
# https://juicefs.com/docs/zh/community/hadoop_java_sdk/#%E7%A4%BE%E5%8C%BA%E5%BC%80%E6%BA%90%E7%BB%84%E4%BB%B6
RUN mv /tmp/juicefs-hadoop.jar /opt/hadoop/share/hadoop/common/lib/
RUN mv /tmp/postgresql.jar /opt/hive/lib/

USER hive
